package com.katze.boot.zookeeper.service;

import com.katze.common.Message;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.service.annotation.HttpExchange;

@HttpExchange(value = "zookeeper")
public interface FeignZookeeperService {

    @HttpExchange(value = "/exists", method = "GET")
    Message exists(@RequestParam("id") String id);

    @HttpExchange(value = "/{method}", method = "POST")
    Message post(@PathVariable("method") String method, @RequestBody Object entity);

    @HttpExchange(value = "/{method}", method = "PUT")
    Message put(@PathVariable("method") String method, @RequestBody Object entity);

    @HttpExchange(value = "/{method}", method = "DELETE")
    Message delete(@PathVariable("method") String method, @RequestParam("id") String id);
}
